package org.longgang.service.impl;

import java.util.List;

import org.longgang.bean.Position;
import org.longgang.dao.PositionDAO;
import org.longgang.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("PositionService")
public class PositionServiceImpl implements PositionService {

	@Autowired
	private PositionDAO dao;
	
	@Override
	public Integer insertPosition(Position info) {
		// TODO Auto-generated method stub
		return dao.insertPosition(info);
	}

	@Override
	public Integer updatePosition(Position info) {
		// TODO Auto-generated method stub
		return dao.updatePosition(info);
	}

	@Override
	public Integer changePosition(Position info) {
		// TODO Auto-generated method stub
		return dao.changePosition(info);
	}

	@Override
	public List<Position> selectPosition(Position info) {
		// TODO Auto-generated method stub
		return dao.selectPosition(info);
	}
	
	@Override
	public List<Position> selectAllPosition(Integer status,Integer page,Integer pages) {
		// TODO Auto-generated method stub
		return dao.selectAllPosition(status,page,pages);
	}
	
	@Override
	public Position selectPositionById(Position info) {
		// TODO Auto-generated method stub
		return dao.selectPositionById(info);
	}

	@Override
	public Integer sumPosition(Position info) {
		// TODO Auto-generated method stub
		return dao.sumPosition(info);
	}

	@Override
	public Integer sumAllPosition(Position info) {
		// TODO Auto-generated method stub
		return dao.sumAllPosition(info);
	}

	@Override
	public Integer sumSomePosition(Integer status, String dat) {
		// TODO Auto-generated method stub
		return dao.sumSomePosition(status, "%"+ dat +"%");
	}

	@Override
	public List<Position> selectSomePosition(Integer status, String dat, Integer page, Integer pages) {
		// TODO Auto-generated method stub
		return dao.selectSomePosition(status,"%"+ dat +"%", page, pages);
	}

}
